/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author taticay
 */
@Embeddable
public class InLinePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_line")
    private int idLine;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_brand")
    private int idBrand;

    public InLinePK() {
    }

    public InLinePK(int idLine, int idBrand) {
        this.idLine = idLine;
        this.idBrand = idBrand;
    }

    public int getIdLine() {
        return idLine;
    }

    public void setIdLine(int idLine) {
        this.idLine = idLine;
    }

    public int getIdBrand() {
        return idBrand;
    }

    public void setIdBrand(int idBrand) {
        this.idBrand = idBrand;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idLine;
        hash += (int) idBrand;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InLinePK)) {
            return false;
        }
        InLinePK other = (InLinePK) object;
        if (this.idLine != other.idLine) {
            return false;
        }
        if (this.idBrand != other.idBrand) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InLinePK[ idLine=" + idLine + ", idBrand=" + idBrand + " ]";
    }
    
}
